<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>提现申请</title>
	<link href="/res/css/style.css" rel="stylesheet" type="text/css" />
	<link href="/res/js/lib/layer/skin/layer.css" rel="stylesheet" type="text/css" />
	<link href="/res/js/lib/layer/skin/layer.ext.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/res/js/jquery.js"></script>
	<script type="text/javascript" src="/res/js/lib/json2.js"></script>	
	<script type="text/javascript" src="/res/js/lib/layer/layer.js"></script>
	<script type="text/javascript" src="/res/js/common/msgTools.js"></script>
	<script language="javascript" type="text/javascript" src="/res/js/lib/datePicker/WdatePicker.js"></script>	
	<script type="text/javascript" src="/res/js/pages/account/cashAskList.js"></script>
    
<script type="text/javascript">
	$(function(e) {
		//$("select").uedSelect({});
		
	}); 
</script>
<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">资金日志</a></li>
    <li><a href="#">${!QUERY?"提现申请":"提现申请查询"}</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    <form id="exportForm0" action="/account/notice/cash/ask/export" method="post">
<!--        <input type="hidden" name="auditStatus" value="0"/>
       <input type="hidden" name="createTime"/>
       <input type="hidden" name="createTime1"/> -->
    </form>
<!--     <form id="exportForm1" action="/account/notice/cash/ask/export" method="post">
       <input type="hidden" name="auditStatus" value="1"/>
       <input type="hidden" name="createTime"/>
       <input type="hidden" name="createTime1"/>       
    </form> -->    
    <form id="queryForm" action='/account/notice/cash/ask${!QUERY?"":"?__query__"}' method="post"> 
    <div class="tools" style="margin:3px 0px;background: #efefef;padding:6px 0px;">   
        <span id="qryCond" class="toolbar" style="margin-left:10px;">
		   审核状态：
 			 <select class="dfinput"  name="auditStatus" style="width:100px;" onchange='submit()'>
 			    <option value="-1" ${!empty(dto) && dto.auditStatus==-1?"selected":""}>---全部---</option>
 			    <option value="0" ${!empty(dto) && dto.auditStatus==0?"selected":""}>待审核</option>
				<option value="1" ${!empty(dto) && dto.auditStatus==1?"selected":""}>已通过</option>
				<option value="2" ${!empty(dto) && dto.auditStatus==2?"selected":""}>未通过</option>
				<option value="3" ${!empty(dto) && dto.auditStatus==3?"selected":""}>已打款</option>
			 </select>
        <c:if test="${false}"> 
		   状态：	
 			   <select class="dfinput"  name="level" style="width:100px;">
				<option value="">普通会员</option>
				<option value="vip">vip会员</option>
				<option value="gold">金钻会员</option>
			   </select>
		 </c:if>	     
                       用户名：<input name="userName" value="${dto.userName}" type="text" class="dfinput" style="width:100px;"/>
                       手机号：<input name="mobile" value="${dto.mobile}" type="text" class="dfinput" style="width:100px;"/>
                      申请时间：<input id="d12" name="createTime" value="${dto.createTime}" type="text" class="dfinput" style="width:100px;" onClick="WdatePicker()"/>
              <img onclick="WdatePicker({el:'d12'})" src="/res/js/lib/datePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">至
              <input id="d13" name="createTime1" value="${dto.createTime1}" type="text" class="dfinput" style="width:100px;" onClick="WdatePicker()"/>
              <img onclick="WdatePicker({el:'d13'})" src="/res/js/lib/datePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle">             
        </span>
    	<ul class="toolbar" style="margin-left:20px;">
	        <li onclick="$('#queryForm').submit()"><span><img src="/res/images/ico06.png" /></span>搜索</li>
	        <c:if test="${!QUERY}">
	        <li onclick="batchPay()"><span></span>批量确认打款</li>
	        <li onclick="exportDat0()"><span><img src="/res/images/f05.png" /></span>导出</li>
<!-- 	        <li onclick="exportDat1()"><span><img src="/res/images/f05.png" /></span>导出已通过</li>
	        <li onclick="exportEnd()"><span><img src="/res/images/f05.png" /></span>导出已打款</li> -->
	        </c:if>
        </ul>    
    </div>

    <table class="tablelist">
    	<thead>
	    	<tr>
	        <th class="chk"><input id="chkAll" type="checkbox" value="" /></th>
	        <th>编号</th>
	        <th>ID </th>
			<th>金额 </th>
			<th>会员名</th> 
			<th>申请时间</th>
			<th>申请备注</th>
			<th>银行卡</th>
			<th>持卡人</th>
			<th>开户行/支行</th>
			<th>审核状态</th> 
			<th>审核意见</th> 
			<th>申请时间</th>
			<th>确认支付时间</th> 						
			<th>支付备注</th>
			<c:if test='${!QUERY}'><th>操作</th></c:if>
	        </tr>
        </thead>
        <tbody>        
	        <c:forEach items="${list}" var="row" varStatus="status">
 		        <tr>
		        <td align="center"><input id="chk_${row.id}" type="checkbox" value="${row.id}" /></td>
		        <td>${status.index+1}</td>
		        <td>${row.id}</td>
		        <td>${row.money}</td>
		        <td><a href="javascript:viewUser('${row.userid}')" class="tablelink">${row.user_name}</a></td>
		        <td><fmt:formatDate value="${row.create_time}" pattern="yyyy-MM-dd HH:mm"/> </td>
		        <td>${row.memo}</td> 		        
		        <td>${row.bank_card}</td>
		        <td>${row.identify_name}</td>
		        <td>${row.bank_name}${empty(row.bank_zone)?"":"_"}${row.bank_zone}</td>
		        <td>
		            <c:choose>
		               <c:when test="${row.audit_status==0}">待审核</c:when>
		               <c:when test="${row.audit_status==1}">已通过</c:when>
		               <c:when test="${row.audit_status==2}"><span style='color:#cc0000;'>未通过</span></c:when>
		               <c:when test="${row.audit_status==3}"><span style='color:#037003;'>已打款</span></c:when>
		            </c:choose>	
		        </td>
		        <td>${row.audit_msg}</td>
		        <td><fmt:formatDate value="${row.create_time}" pattern="yyyy-MM-dd HH:mm"/></td>
		        <%-- <td><fmt:formatDate value="${row.audit_time}" pattern="yyyy-MM-dd HH:mm"/> </td> --%>
		        <td><fmt:formatDate value="${row.pay_time}" pattern="yyyy-MM-dd HH:mm"/> </td>
		        <td>${row.pay_log}</td>	
		        <c:if test='${!QUERY}'>
		        <td>
		           <c:choose>
		               <c:when test="${row.audit_status==0}">
				           <a href="javascript:pass('${row.id}')" class="tablelink">通过</a>		           
				           <a href="javascript:refuseDlg('${row.id}')" class="tablelink">不通过</a>  		               
		               </c:when>
		               <c:when test="${row.audit_status==1}">
				           <a href="javascript:cancel('${row.id}')" class="tablelink">撤消</a>		           
				           <a href="javascript:pay('${row.id}')" class="tablelink">确认打款</a>  		               
		               </c:when>
		               <c:when test="${row.audit_status==2}">
				           <span style='color:#037003;'>已结束,资金已退回</span>		   		               
		               </c:when>
		               <c:when test="${row.audit_status==3}"><span style='color:#037003;'>已结束</span></c:when>		               		               		               
		           </c:choose>
		        </td>
		        </c:if>		
		        </tr>  
	        </c:forEach>
         </tbody>
    </table>   
    </form>
    <div class="pager" style="float: left;">金额总计：${pager.data.sum_money}</div> 
    <tags:pager pagerRange="10" pageSize="${pager.pageSize}" totalPage="${pager.pageCount}" curIndex="${pager.pageIndex}" rowCount="${pager.rowCount}" formId="queryForm"></tags:pager> 
 
    
    </div>
    
    <script type="text/javascript">
	   $('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>

</html>
